﻿<Page
    x:Class="Wimm.UI.Login.Registration"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Wimm.UI.Login"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="Black" Height="400" Width="600">
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="1">
            <StackPanel.Background>
                <ImageBrush ImageSource="../Assets/Splesh2.png"></ImageBrush>
            </StackPanel.Background>
        </StackPanel>
        <TextBox Grid.Row="1" Grid.Column="1" Height="30" Margin="5 20 5 5" 
                 VerticalAlignment="Top" HorizontalAlignment="Stretch"
                 PlaceholderText="Enter your name..." x:Uid="RegistrationName"
                 Text="{Binding UserName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
        <TextBox Grid.Row="1" Grid.Column="1" Height="30" Margin="5 5 5 20"
                 VerticalAlignment="Bottom" HorizontalAlignment="Stretch"
                 PlaceholderText="Enter your password..." x:Uid="RegistrationPassword"
                 Text="{Binding Password, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></TextBox>
        <Button Grid.Row="2" Grid.Column="1" Content="Add new account" 
                Margin="0 0 5 0" x:Uid="RegistrationBtn"
                HorizontalAlignment="Center"
                Command="{Binding CreateCommand}"></Button>
        <TextBlock Grid.Row="2" Grid.Column="1" 
                   HorizontalAlignment="Center" VerticalAlignment="Top" 
                   Foreground="Red" Visibility="Visible"
                   Text="{Binding ErrorMessage}"/>
    </Grid>
</Page>
